import AppConstants from "../framework/scripts/AppConstants"
import PanelBase from "../framework/scripts/view/PanelBase"
import Tip from "./core/Tip"


export default class PanelGreen extends PanelBase {
    public skinPath: string = 'PanelGreen'
    public panelMaskStyle: number = AppConstants.panelMaskStyle.Close | AppConstants.panelMaskStyle.Black //关闭组件(点击面板区域外会关闭面板)加半透明组件
    public panelShowStyle: number = AppConstants.panelShowStyle.Custom //自定义显示方式


    protected onInitDone(): void {
        this.skin.scale = 0

        this.tweenShow = cc.tween(this.skin).to(this.duration, { scale: 1, angle: 360 * 5 })
        this.tweenHide = cc.tween(this.skin).to(this.duration, { scale: 0, angle: 0 })
    }

    protected onButtonClick(button: cc.Node) {
        if (button.name == 'BtnTip') {
            Tip.show('这是绿色面板的Tip')
        }
    }
}
